
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title></title>
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/base.css?v=1" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/mod.css?v=1" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/list.css?v=1" />
		<link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/page.css?v=2" />
		<script src="{$staticHost}/static/js/jquery-1.8.3.min.js"></script>
		<script src="{$staticHost}/static/js/js.js"></script>
		<script src="{$staticHost}/static/js/mod.js"></script>
		
	</head>
	
	<body>
		<div id="list_details"></div>
		<script id="test" type="text/html">
		<article class="down-app">
			 <a href="http://mobile.hupu.com/download/joggers?r=share">
				立即下载
			</a>

		</article>
		<%if( type==0){%>
		<article class="time-box">
			<img src="<%=img%>">
			<% if(status==0){%>
			<ul id="djs">
				<li>距离活动开始还有</li>
				<li>
					<span id="t_d"></span>天
					<span id="t_h"></span>时
					<span id="t_m"></span>分
				</li>
				<li><%=leBox%></li>
			</ul>
			<%}%>
				
			<% if(status==1){%>
			<ul>
				<li></li>
				<li>活动已取消</li>
				<li></li>
			</ul>
			<%}%>
		</article>
		<%}%>
		<!-- 乐活活 -->

		<%if( type==1||type==2){%>
		<article class="time-box">
			<img src="<%=img%>">
			<% if(status==0){%>
			<ul id="djss">
				<li>距离竞赛开始还有</li>
				<li>
					<span id="t_d"></span>天
					<span id="t_h"></span>时
					<span id="t_m"></span>分
				</li>
				<li></li>
			</ul>
			<%}%>
				
			<% if(status==1){%>
			<ul>
				<li></li>
				<li>活动已取消</li>
				<li></li>
			</ul>
			<%}%>
		</article>
		<%}%>
		<!-- 竞赛 -->
		
		<article class="activity-explain line-gray-bottom">
			<%=title%>
			<% if (cost=="免费"){%>
			<p id="cost" class="color-red f12"><%=cost%></p>
			<%}%>
			<% if (cost!="免费"){%>
			<p class="color-blue f12">￥<%=cost%></p>
			<%}%>
			
		</article>
		<!-- 活动名称  费用 -->

		<article class="ad-box">
			<h3 class="time-bar ">
				<i class="ico-time"></i>
				<%=stime%>-<%=etime%>
			</h3>
			<%if(status==0){%>
			<p class="hidee count-down">
				距离活动结束还有
				<span id="ta_d"></span> 天 
				<span id="ta_h"></span> 小时 
				<span id="ta_m"></span> 分
			</p>
			<%}%>
		</article>
		<!-- 倒计时 -->
		<a class="activity-crl" href="http://mobile.hupu.com/download/joggers?r=share">
			<img src="{$staticHost}/static/images/img/lrc.jpg">
		</a>


		<%if( type==0){%>
			<% if(place && place.length>0){%>
				<article class="color_gray line-gray-bottom p10">
					<i class="ico-location"></i><%=place%>
				</article>
			<%}%>
		<%}%>
		<!-- 活动地址 -->
		<%if( type==1){%>
		<dl class="activity-explain line-gray-bottom">
			<dt>竞赛规则</dt>
			<dd>
				活动期限
				<span><%=timeLimit%>天</span>
			</dd>
			<dd>
				累计里程
				<span><%=target%>km</span>
			</dd>
		</dl>
		<%}%>
		<!-- 里程 竞赛规则-->
		<%if( type==2){%>
		<dl class="activity-explain line-gray-bottom">
			<dt>打卡规则</dt>
			<dd>
				每日里程
				<span><%=target%>km</span>
			</dd>
			<dd>
				目标打卡
				<span><%=days%>天</span>
			</dd>
		</dl>
		<%}%>
		<!-- 打卡 竞赛规则 -->
		<%if( type != 0){%>
		<% if(status !=1){%>
		<section id="rank-box" class=" line-gray-bottom">
			<%if( type==2){%>
			<section>
				<h2 class="rank-title">
					<span>今日里程</span>
					<span>累计打卡</span>
				</h2>
				<ul class="list-01">
					<%for(var i=0;i<members.length; i++) {%>
					<li>
						<span>
							<% if ( members[i] .header.length>0){%>
							<img src="<%= members[i].header%>" />
							<%}%>
							<% if ( members[i] .header.length==0){%>
								<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">　
							<%}%>
						</span>
						<span><%= members[i].nickname%></span>
						<span><%= members[i].mileage%>km</span>
						<span><b><%= members[i].total_day%>天</b></span>
					</li>
					<%}%>
				</ul>
			</section>
			
			<%}%>
			<!--打卡-->
			<%if( type==1){%>
			<% if(members.length > 0){%>
			<section  class="rank-mileage">
				<h2 class="rank-title">
					<span>累积运动</span>
					<span>累计里程</span>
				</h2>
				<ul class="list-01">
					<%for(var i=0;i< members.length; i++) {%>
					<li>
						<span>
							<% if ( members[i] .header.length>0){%>
							<img src="<%= members[i].header%>" />
							<%}%>
							<% if ( members[i].header.length==0){%>
								<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">　
							<%}%>
							<% if (members[i].rank==1){%><i class="ico-crown-2"></i><%}%>
							<% if (members[i].rank==2){%><i class="ico-crowny-2"></i><%}%>
							<% if (members[i].rank==3){%><i class="ico-crownt-2"></i><%}%>
						</span>
						<span><%= members[i].nickname%></span>
						<span><%= members[i].total_day%>天</span>
						<span><b><%= members[i].mileage%>km</b></span>
						<em><%= members[i].rank%></em>
					</li>
					<%}%>
				</ul>
			</section>
			<%}%>
			<%}%>
		</section>
		<%}%>
		<%}%>
		<!-- 排行榜 -->
		<section class="w640" style="padding-bottom: 42px">
			<!-- <div class="line-gray card-q">
				<span class="f15 color_dakgray mlr10">所属群</span>
				<span class="f15 color_gray"><%=gName%></span>
				<span class="f12 color_gray">发起人：<%=name%></span>
			</div> -->
			<div class="card-q" style="height:30px; line-height:30px; padding-top:10px;">
				<span class="f15 color_dakgray mlr10">所属群</span>
				<%=gName%>
			</div>
			<div class="card-q img-list"style="height:30px; line-height:30px; padding:0;">
				<span class="f15 color_dakgray mlr10">发起人</span>
				<% if (header.length>0){%>
					<img src="<%=header%>" />
				<%}%>
				<% if (header.length==0){%>
					<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">　
				<%}%>


				<%=name%>
			</div>
			<div id="member" class="img-list line-gray-bottom arrows">
				<a href="{$staticHost}/show/acMmember?aid={$aid}&gid={$gid}"></a>
				<span class="f15 color_dakgray mlr10">参与者</span>
				<% for(var i=0; i< num ;i++){%>
					<% if (joins[i].header.length>0){%>
						<img src=<%=joins[i].header%> alt="">
					<%}%>
					<% if (joins[i].header.length==0){%>
						<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">　
					<%}%>
				<%}%>
				<i><%=joinNum%></i>
			</div>
			
			<article class="txt-01">
				<h5>活动说明</h5>
				<p><%=introduce%></p>
			</article>
			<% if (activity.length > 0){%>
			<h3 class="line-gray-top f15 lh50 color_gray line-gray" >
				<a href="" class="pl10">群组其他活动</a>
			</h3>
			<ul class="list-04">
				<% for(var i=0; i< activity.length ;i++) { %>
				<li><%=activity[i].title%></li>
				<%}%>
			</ul>
			<%}%>
			
			<%if (comment.length >0){%>
			<h3 class="f15 color_gray p10">全部评论</h3>
			<ul class="list-08">
				<% for(var i=0; i< comment.length ;i++) { %>
				<li>
					<% if (comment[i].header && comment[i].header.length>0){%>
						<img src=<%=comment[i].header%>>
					<%}%>
					<% if (!comment[i].header || comment[i].header.length==0){%>
						<img src="{$staticHost}/static/images/bg/group_image_nor-min.png">　
					<%}%>
					<dl>
						<dt>
							<%=comment[i].name%>
							<span class="ico-time"><%=comment[i].add_time %></span>
						</dt>
						<dd><%=comment[i].content.replace(/<at *.+ "">/, "@")%> </dd>
					</dl>
				</li>
				<%}%>
				
			</ul>
			<a href=""></a>
			<%}%>
		</section>
        <a class="dow-app" id="join">我要参加</a>
		<a class="dow-app" id="njoin" href="http://mobile.hupu.com/download/joggers?r=share">
        	开始跑步
		</a>
		<!-- 参加按钮 -->
		<div class="web-mask" style="display:none">
			<div class="close"></div>
			<section class="apply"  style="display:none">
				<h1>
					您已参加活动
					<small></small>
				</h1>
				<p>
					
				</p>
			</section>
			<section id="input-list" style="display:none;"">
				<ul class="group-input">
					<li>
						<i>费用</i>
						<p>
							<% if (cost=="免费"){%>
								<%=cost%>
							<%}%>
							<% if (cost!="免费"){%>
								<%=cost%>元
							<%}%>
						</p>
					</li>
					<li>
						<i>姓名</i>
						<input id="name" type="text" name="name" placeholder="请输入您的姓名"/>
					</li>
					<li>
						<i>手机</i>
						<input id="mobile" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" type="text" name="phone" placeholder="请输入您的手机号码"/>
					</li>
					<li>
						<i>性别</i>
						<input id="info" type="text" name="gender " placeholder="请输入您的性别"/>
					</li>
					<%if(collect_ext_name1){%>
					<li>
						<i><%=collect_ext_name1%></i>
						<input id="" type="text" name="" placeholder="请输入<%=collect_ext_name1%>"/>
					</li>
					<%}%>
					<%if(collect_ext_name2){%>
					<li>
						<i><%=collect_ext_name2%></i>
						<input id="" type="text" name="" placeholder="请输入<%=collect_ext_name2%>"/>
					</li>
					<%}%>
				</ul>
				<!-- <a id="qrcj" class="dow-app">确认参加</a> -->
				<input id="qrcj" type="submit" value="确认参加" class="dow-app"/>
			</section>
		</div>
		<!-- 弹框 -->
	</script>

	<script>
		var gid = "{$gid}";
		var aid = "{$aid}";
        var user_uid = "{$user_uid}";
		var num=0;
		var timestamp = Date.parse(new Date()).toString();
		timestamp = timestamp.substr(0,10);
		$(function(){
			$.getJSON('{$staticHost}/groupWeb/newDetail', { aid:aid, gid:gid},function(data, error) {
				data = data.result
				var info=formatActivityData(data);
				$("title").html(data.title);
				var limit =info.etime-info.stime;
				L = parseInt(limit / 60 / 60 % 24, 10)
				// 小时
				var timeLimit =Math.floor(limit/86400)
				if(L==0){
					data.timeLimit = timeLimit
				}else{
					data.timeLimit = timeLimit+1
				}
				// data.timeLimit = timeLimit
				// 判断竞赛活动天数
				var d = new Date(parseInt(info.stime) * 1000);
				info.stime =d.getFullYear()+"."+xs(d.getMonth()+1)+"."+xs(d.getDate())+ " "+xs( d.getHours())+":"+xs(d.getMinutes());
				var q = new Date(parseInt(info.etime) * 1000);
				info.etime =q.getFullYear()+"."+xs(q.getMonth()+1)+"."+xs(q.getDate())+ " "+xs(q.getHours())+":"+xs(q.getMinutes());
				function xs(n){ return n<10?("0"+n):n;}

				// 转换时间
				if(info.comment.length > 0) {
					for(var x in info.comment) {
						if(info.comment[x].add_time !== 'undefined') {
							var dateAddTime =  new Date(new Date(parseInt(info.comment[x].add_time) * 1000).getTime());
							var q = new Date(parseInt(info.comment[x].add_time) * 1000);
							addTime =xs(q.getMonth()+1)+"."+xs(q.getDate());
							addTimeY = q.getFullYear()+"."+xs(q.getMonth()+1)+"."+xs(q.getDate())
							function xs(n){ return n<10?("0"+n):n;}
							
							 //开始时间
							var dateNow=new Date();    
							var timeSpanSinceAdd=dateNow.getTime()-dateAddTime; 
							var days=Math.floor(timeSpanSinceAdd/(24*3600*1000))
 							var leave1=timeSpanSinceAdd%(24*3600*1000)   
							var hours=Math.floor(leave1/(3600*1000))
							var leave2=leave1%(3600*1000)        
							var minutes=Math.floor(leave2/(60*1000))
							var leave3=leave2%(60*1000)      
							var seconds=Math.round(leave3/1000)
							if(days>365){
								info.comment[x].add_time =addTimeY
							}else if(days>6){
								info.comment[x].add_time =addTime
							}else if(days>=1&&days<=6){
								info.comment[x].add_time =days+"天前"
							}else if(hours>0&&hours<=24){
								info.comment[x].add_time =hours+"小时前"
							}else if(minutes>0&&minutes<60){
								info.comment[x].add_time =minutes+"分钟前"
							}
						}
						var content = info.comment[x].content;
						if(content.indexOf('<at ') >= 0) {
							content = content.replace(new RegExp('\<at', 'g'), '@<a');
							content = content.replace(new RegExp('\<\/at\>', 'g'), '</a>');
							info.comment[x].content = content;
						}
					}
				}
				// 评论时间判断
				
				// 验证
				template.config('escape', false);
				var imgWidth =document.body.clientWidth; 
				if(imgWidth==320){
					num = data.joins.length > 5 ? 5 : data.joins.length;
					data.num = num;
				}else if(imgWidth>320&&imgWidth<400){
					num = data.joins.length > 6 ? 6 : data.joins.length;
					data.num = num;
				}
				else{
					num = data.joins.length > 7 ? 7 : data.joins.length;
					data.num = num;
				}
				//  参加活动成员显示个数
				var html = template('test', data);
				document.getElementById('list_details').innerHTML = html;
				//  渲染页面
				if(data.status==1){
					$(".dow-app").hide();
				}
				// 活动状态取消的时候不显示参加按钮
		
				$(".close").click(function(){
					window.location.reload()
					$(".web-mask").hide()
				})
			if(data.isJoin==1){
				$("#njoin").html("开始跑步")
				$('#njoin').attr('href','http://mobile.hupu.com/download/joggers?r=share'); 
				$("#join").hide();
				$("#njoin").show();
				if(data.type==0){
					$(".dow-app").hide();
				}
			}else{
				$("#njoin").hide();
				$("#join").click(function(){
					if(!user_uid){
						$('#join').attr('href','{$staticHost}/connect/login'); 
					}
					if(user_uid){
						if(data.way==0&&data.groupStatus!=0){
							// 群内成员参加  且非群内成员用户弹出
							$(".web-mask").show();
							$(".apply").show();
							$(".web-mask h1").hide();
							$("#input-list").hide();
							$(".apply p").html("该活动仅允许群内成员参与<br/>您可以加入群组再参与该活动<br/><a id='jrqz'>加入群组</a>");
						}else if(data.is_collect_info==1){
							// 用户需要提交报名信息
							$(".web-mask").show();
							$("#input-list").show();
							$(".apply").hide();
						}else{
							$.ajax({
								method: 'get',
								url: '{$staticHost}/groupWeb/applyGroup',
								dataType: 'json',
								data: { gid:gid},
								success: function(data,result,status){
									$.ajax({
										method: 'get',
										url: '{$staticHost}/groupWeb/handleActivity',
										dataType: 'json',
										data: { "aid":aid,"gid":gid,"type":"1"},
										success: function(data,status){
											$(".web-mask").show()
											$(".apply").show();
											$(".apply *").show();
											$("#input-list").hide();
											$(".web-mask small").html(data.result.msg.subtitle)		
											$(".web-mask p").html("打开<a id='khd' class='color-blue'href='http://mobile.hupu.com/download/joggers?r=share'>虎扑跑步客户端</a><br/>快快跑起来吧")
												},
										error: function(data,result){
										
										}
									})
								},
								error: function(data,status){
								}
							})
						}
					}
				})
			}
			$('.web-mask').on('click', "#jrqz", function(){
				if(data.isverify==0){
					// 加群需验证  1用户已申请加入群弹出
					$.ajax({
						method: 'get',
						url: '{$staticHost}/groupWeb/applyGroup',
						dataType: 'json',
						data: { gid:gid,"reason":"申请加群"},
						success: function(data,result,status){
								$(".web-mask").show()
								$("#input-list").hide()
								$(".apply").show();
								$(".apply h1").hide()
								$(".apply p").show();
								$(".apply p").html("休息一会儿！<br/>群主正在审核很快就可以参与喽！");
						},
						error: function(data,status){
						}
					})
					 
				}else if(data.is_collect_info==1){
					// 用户需要提交报名信息
					$(".web-mask").show();
					$("#input-list").show();
					$(".apply").hide();
					
				}else{
					$.ajax({
						method: 'get',
						url: '{$staticHost}/groupWeb/applyGroup',
						dataType: 'json',
						data: { gid:gid},
						success: function(data,result,status){
							$.ajax({
								method: 'get',
								url: '{$staticHost}/groupWeb/handleActivity',
								dataType: 'json',
								data: { "aid":aid,"gid":gid,"type":"1"},
								success: function(data,status){
									$(".web-mask").show()
									$(".apply").show();
									$(".apply *").show();
									$("#input-list").hide();
									$(".web-mask small").html(data.result.msg.subtitle)		
									$(".web-mask p").html("打开<a id='khd' class='color-blue'href='http://mobile.hupu.com/download/joggers?r=share'>虎扑跑步客户端</a><br/>快快跑起来吧")
										},
								error: function(data,result){
								
								}
							})
						},
						error: function(data,status){
						}
					})
					
				}
			})			
			$("#qrcj").click(function(){
				var checked = true;
				var mobileReg = /^(13[0-9]|15[0-9]|18[0-9]|14[57])[0-9]{8,8}$/;
				var cardReg = /(^\d{15,15}$)|(^\d{18,18}$)|(^\d{17,17}(\d|X|x)$)/;
				var info = $.trim($('#info').val());
				var name = $.trim($('#name').val());
				var mobile = $.trim($('#mobile').val());
				if(info!='男'&&info!='女'){
					checked = false;
					$('#info').css('color','red');
					$('.btn-bottom').css('color','#ADADB3');
				} else if(name == '') {
					checked = false;
					$('#name').css('color','red');
				}else if(mobile == '' || mobile.length != 11 || !mobileReg.test(mobile)) {
					checked = false;
					$('#mobile').css('color','red');
					$('.dow-app').css('color','#ADADB3');

				}
				if(checked){
					var params = {};
					params.aid = aid
					params.gid = gid
					params.type = 1;
					params.name =$(".group-input li:eq(2) input").val();
					params.phone =$(".group-input li:lt(3) input").val();
					params.gender =$(".group-input li:lt(4) input").val();
					params.collect_ext_value1 = $(".group-input li:lt(5) input").val();
					params.collect_ext_value2 = $(".group-input li:lt(6) input").val();
					$.ajax({
						method: 'get',
						url: '{$staticHost}/groupWeb/applyGroup',
						dataType: 'json',
						data: { gid:gid},
						success: function(data,result,status){
							$.ajax({
								method: 'get',
								url: '{$staticHost}/groupWeb/handleActivity',
								dataType: 'json',
								data: { "aid":aid,"gid":gid,"type":"1"},
								success: function(data,status){},
								error: function(data,result){
								
								}
							})
						},
						error: function(data,status){
						}
					})
					$.getJSON('{$staticHost}/groupWeb/handleActivity',params,function(result){
						window.location.reload()

					})
				}
			})

			info.stime = (Date.parse(new Date(info.stime.replace('.','/').replace('.','/'))).toString()).substr(0,10);
		    info.etime =( Date.parse(new Date(info.etime.replace('.','/').replace('.','/'))).toString()).substr(0,10);
				if(info.stime>timestamp){
						$("#rank-box").hide();
						$(".hidee").hide();
						if(data.isJoin==1){
						$('#njoin').attr('href','http://mobile.hupu.com/download/joggers?r=share'); 
							$("#join").hide();
							$("#njoin").show();
						}
					}
				if(timestamp > info.stime && timestamp<info.etime){
					$("#rank-box").show();
					$(".hidee").show();
					$("#djs li:eq(0)").html("");
			    	$("#djs li:eq(1)").html("活动正在进行中");
			    	$("#djs li:eq(2)").html("让我们对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华！");
			    	$("#djss li:eq(0)").html("");
			    	$("#djss li:eq(1)").html("活动正在进行中");
			    	$("#djss li:eq(2)").html("有目标的人在奔跑，加入活动一起奔跑吧");
				   if(data.isJoin==1){
						$('#njoin').attr('href','http://mobile.hupu.com/download/joggers?r=share'); 
						$("#join").hide();
						$("#njoin").show();
						
					}else{
						$(".dow-app").hide();
					}
				}
				if(info.etime < timestamp){
					$("#rank-box").show();
					$(".hidee").hide();
					$("#djs li:eq(0)").html("");
			    	$("#djs li:eq(1)").html("活动已结束");
			    	$("#djs li:eq(2)").html("让我们对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华！");
			    	$("#djss li:eq(0)").html("");
			    	$("#djss li:eq(1)").html("活动已结束");
			    	$("#djss li:eq(2)").html("一个结束意味着一种新的开始，生命不息，奔跑不止！");
					if(data.isJoin==1&&data.type!=0){
				    	$(".activity-crl").show();
						$(".dow-app").hide();
					}else{
						$(".dow-app").hide();
					}
				}
			});
		});
		
		function formatActivityData(info) {
			if(info) {
				info.leBox='我要成为全场的焦点 喜唰唰 喜唰唰 唱歌 跳舞练起来！';
				if(info.cost == 0){
					info.cost = '免费';
					}
				function GetRTime(){
			  	var Tt = info.stime;
				var NowTime = ((new Date()).getTime()).toString().substr(0,10);
			    var t =Tt - NowTime;
			    var d=0;
			    var h=0;
			    var m=0;
			   
			    if(t>=0){
			      d=Math.floor(t/60/60/24);
			      h=Math.floor(t/60/60%24);
			      m=Math.floor(t/60%60); 
			    }else{
			    	clearInterval(id);
			    }
			     if (d<10) {
			     	d = '0'+d
			     }
			     if(d>=5){
			     	$("#djss li:eq(2)").html("活动快要开始啦，呼朋唤友一起来玩吧");
			     }
			     if(d<=4&&d>=2){
			     	$("#djss li:eq(2)").html("最后3天，养精蓄锐准备迎接挑战吧！");
			     }
			     if(d<=2&&d>=0&&h>0){
			     	$("#djss li:eq(2)").html("用跑步为自己代言，fighting！");
			     }
			     if (h<10) {
			     	h = '0'+h
			     }
			     if (m<10) {
			     	m = '0'+m
			     }
			    $("#t_d").html(d);
			    $("#t_h").html(h);
			    $("#t_m").html(m);
			}
			var id=setInterval(GetRTime,0);

			function TGetRTime(){
			  	var Ttt =  info.etime;
			  	var t =Ttt - timestamp;
			  	var d=0, h=0, m=0;
			    if(t>=0){
			      d=Math.floor(t/60/60/24);
			      h=Math.floor(t/60/60%24);
			      m=Math.floor(t/60%60);
			    }else{
			    	clearInterval(idd);
				}
			     if (d<10) {
			     	d = '0'+d
			     }
			     if (h<10) {
			     	h = '0'+h
			     }
			     if (m<10) {
			     	m = '0'+m
			     }
			    $("#ta_d").html(d);
			    $("#ta_h").html(h);
			    $("#ta_m").html(m);
			    var dd = $("#ta_d").html();
			    var hh = $("#ta_h").html();
			    var mm = $("#ta_m").html();
			    
				if (dd==00&&hh==00&&mm==00) {
			    	$(".hidee").hide();
			    }
			}
			var idd=setInterval(TGetRTime,0);
			}
			return info;
			}
		var newsUrl = window.location.href;
        var iconUrl = 'http://irun.hupu.com/static/images/share/icon.png';
        var dataForWeixin={
            appId:"",
	        TLImg: iconUrl,
	        url: newsUrl,
	        title: document.title,
	        desc:"虎扑跑步",
	        fakeid:"",
	        callback:function(){}
        };
        (function() {
            var onBridgeReady=function() {
            WeixinJSBridge.on('menu:share:timeline', function(argv) {
            (dataForWeixin.callback)();
                WeixinJSBridge.invoke('shareTimeline', {
                    "img_url":dataForWeixin.TLImg,
                    "img_width":"120",
                    "img_height":"120",
                    "link":dataForWeixin.url,
                    "desc":dataForWeixin.desc,
                    "title":dataForWeixin.title
                    }, function(res){});
                });
            };
            if(document.addEventListener) {
               document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
            } else if(document.attachEvent) {
               document.attachEvent('WeixinJSBridgeReady',onBridgeReady);
               document.attachEvent('onWeixinJSBridgeReady',onBridgeReady);
            }
        })();

        
	</script>

</body>


{template 'show/web-footer'}

